Draft
Conversation
…er operations - Add updated_at BIGINT NOT NULL DEFAULT 0 to role_meta, user_meta, group_meta, owner_meta - Create entity_change_log table for HA cross-node targeted metadataIdCache invalidation - Add covering indexes for auth read-path version checks - Add new mapper methods: touchUpdatedAt/batchGetUpdatedAt (RoleMetaMapper), touchUpdatedAt/getUserInfo (UserMetaMapper), touchUpdatedAt/getGroupInfoByUserId (GroupMetaMapper), selectOwnerByMetadataObjectId/selectChangedOwners (OwnerMetaMapper) - Create EntityChangeLogMapper with selectChanges/insertChange/pruneOldEntries - Add result types UserAuthInfo, GroupAuthInfo, OwnerInfo, RoleUpdatedAt, ChangedOwnerInfo, EntityChangeRecord (plain Java classes, Java 11 compatible) - Add schema-1.3.0 and upgrade-1.2.0-to-1.3.0 scripts for MySQL, H2, PostgreSQL - Add unit tests TestAuthMappers covering all new mapper methods Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ervice write paths - RoleMetaService: touchUpdatedAt on privilege grant/revoke (same transaction) - UserMetaService: touchUpdatedAt on role assign/revoke (same transaction) - GroupMetaService: touchUpdatedAt on role assign/revoke (same transaction) - OwnerRelPO: add updatedAt field; insertOwnerRel SQL includes updated_at column - POConverters: set updatedAt=currentTimeMillis in initializeOwnerRelPOsWithVersion - CatalogMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - SchemaMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - TableMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - FilesetMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - TopicMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - ViewMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - ModelMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - MetalakeMetaService: INSERT entity_change_log on rename (ALTER) and drop (DROP) - All entity_change_log INSERTs are in the same DB transaction as the data change Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lementations - GravitinoCache<K,V>: general-purpose cache interface for auth subsystem - getIfPresent, put, invalidate, invalidateAll, invalidateByPrefix, size - invalidateByPrefix enables hierarchical cascade invalidation for metadataIdCache - CaffeineGravitinoCache<K,V>: Caffeine-backed implementation with configurable TTL and max size - NoOpsGravitinoCache<K,V>: no-op implementation for testing and disabled-cache environments - TestGravitinoCache: comprehensive tests covering put/get, invalidate, invalidateAll, invalidateByPrefix (hierarchical cascade and leaf), overwrite, non-string keys, and NoOps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…izer Introduce version-validated caches (userRoleCache, groupRoleCache, loadedRoles with updated_at) and eventual-consistency caches (metadataIdCache, ownerRelCache) backed by GravitinoCache. Implement 4-step auth flow with group role loading, batch role version check, and a ScheduledExecutorService poller for owner and entity structural changes. Add handleEntityStructuralChange to GravitinoAuthorizer interface and new config entries for metadata-id cache size and change poll interval. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hange_log pruning PostgreSQL does not support DELETE ... LIMIT syntax. Override pruneOldEntityChanges in EntityChangeLogPostgreSQLProvider to use DELETE ... WHERE id IN (SELECT id ... LIMIT 1000) instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Coverage Report
Files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…er operations
touchUpdatedAt/getUserInfo (UserMetaMapper), touchUpdatedAt/getGroupInfoByUserId
(GroupMetaMapper), selectOwnerByMetadataObjectId/selectChangedOwners (OwnerMetaMapper)
ChangedOwnerInfo, EntityChangeRecord (plain Java classes, Java 11 compatible)
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com<!--
Examples:
Reference: https://www.conventionalcommits.org/en/v1.0.0/
-->
What changes were proposed in this pull request?
(Please outline the changes and how this PR fixes the issue.)
Why are the changes needed?
(Please clarify why the changes are needed. For instance,
Fix: #(issue)
Does this PR introduce any user-facing change?
(Please list the user-facing changes introduced by your change, including
How was this patch tested?
(Please test your changes, and provide instructions on how to test it: